Skip to content

Hackathon Project 8: Add CUDA-managed projection container support (continuation of the image stage)#1694

Merged
KrisThielemans merged 2 commits intoUCL:masterfrom
Dimitra-Kyriakopoulou:Hackathon_project08_II
Mar 14, 2026
Merged

Hackathon Project 8: Add CUDA-managed projection container support (continuation of the image stage)#1694
KrisThielemans merged 2 commits intoUCL:masterfrom
Dimitra-Kyriakopoulou:Hackathon_project08_II

Conversation

@Dimitra-Kyriakopoulou
Copy link
Contributor

This PR is PART of Hackathon Project 8: update STIR data to CUDA managed pointers, then adapt sirf.STIR data-containers and expose the underlying CUDA managed pointer to Python. It is a continuation of the earlier image stage of the same task. The Stage 1 STIR image part ("images first", via VoxelsOnCartesianGrid for CUDA-managed images) has already been merged upstream in #1693, while the companion Stage 1 SIRF part remains separate in SyneRBI/SIRF#1380.

This new PR contains the STIR continuation for the next two stages of the project. Stage 2 extends the managed-memory path from images to acquisition/projection data, by adding the ProjDataInMemory constructor/storage seam needed for CUDA-managed projection containers. Stage 3 then uses that same STIR continuation as the repository-level basis for the end-to-end managed-memory reconstruction proof. The companion SIRF work is in the fork under Dimitra-Kyriakopoulou/SIRF: the earlier Stage 1 image branch Hackathon_Project8 and the current continuation branch Hackathon_project8_II. The runnable benchmark/proof repository for the whole Project 8 path, including Stage 1, Stage 2, and Stage 3, is Dimitra-Kyriakopoulou/ hackathon_project_08_stir_cuda_managed_pointers.

Changes in this pull request

  • Added a ProjDataInMemory constructor that accepts an externally allocated Array<1,float>&& buffer.
  • Refactored the projection-data layout setup so the geometry-dependent metadata is initialised correctly for both the old path and the new externally supplied buffer path.
  • Scope is deliberately limited to the STIR continuation needed for Stage 2 and then reused by Stage 3.

Testing performed

  • Validated that ProjDataInMemory can preserve a managed Array<1,float> buffer.
  • Validated the deterministic acquisition benchmark used in Stage 2 through the companion SIRF path.
  • Validated the full Stage 3 reconstruction proof through the
    companion SIRF/benchmark path:
    • a real one-subiteration OSMAPOSL update ran with managed acquisition input and managed image output
    • managed and normal reconstructions matched to machine precision
  • The runnable proof-of-use benchmarks are kept separately in Dimitra-Kyriakopoulou/hackathon_project_08_stir_cuda_managed_pointers.

Related issues

Checklist before requesting a review

  • [] I have performed a self-review of my code
  • [] I have added docstrings/doxygen in line with the guidance in the developer guide
  • [] I have implemented unit tests that cover any new or modified functionality (if applicable)
  • The code builds and runs on my machine
  • [] documentation/release_XXX.md has been updated with any functionality change (if applicable)

Contribution Notes

Please tick the following:

  • [x ] The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in STIR (the Work) under the terms and conditions of the Apache-2.0 License.
  • I (or my institution) have signed the STIR Contribution License Agreement (not required for small changes).

@Dimitra-Kyriakopoulou
Copy link
Contributor Author

Dear Professor @KrisThielemans ,
THANK YOU WHOLEHEARTEDLY for the comments and the fix!!!
Dimitra

@KrisThielemans KrisThielemans merged commit 46da4ef into UCL:master Mar 14, 2026
13 checks passed
@KrisThielemans KrisThielemans linked an issue Mar 16, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enable CUDA managed pointers

3 participants